home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / netinclude / inetd.h < prev    next >
C/C++ Source or Header  |  1993-08-12  |  2KB  |  72 lines

  1. #ifndef INETD_H
  2. #define INETD_H
  3.  
  4. /* 
  5.  *    $Filename: inetd.h $
  6.  *    $Release$
  7.  *    $Revision: 1.1 $
  8.  *    $Date: 1993/08/12 08:19:34 $
  9.  *
  10.  * Internet daemon interface definitions
  11.  *
  12.  * Copyright © 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  13.  *                  Helsinki University of Technology, Finland.
  14.  *                  All rights reserved.
  15.  *
  16.  * Author: ppessi <Pekka.Pessi@hut.fi>
  17.  *
  18.  * $Id: inetd.h,v 1.1 1993/08/12 08:19:34 jraja Exp $
  19.  *
  20.  * $Log: inetd.h,v $
  21.  * Revision 1.1  1993/08/12  08:19:34  jraja
  22.  * Initial revision
  23.  *
  24.  * Revision 1.3  1993/06/03  20:12:30  ppessi
  25.  * Changed the daemon naming scheme, removed template from inetd.conf
  26.  *
  27.  * Revision 1.2  93/05/28  20:13:47  ppessi
  28.  * Added Segment pointer to the DaemonMessage.
  29.  * 
  30.  * Revision 1.1  93/05/24  21:42:54  ppessi
  31.  * Initial revision
  32.  */
  33.  
  34. /* 
  35.  * The DaemonPort structure and its associated memory
  36.  * must be allocated with AllocVec call 
  37.  */
  38. struct DaemonPort {
  39.   struct MsgPort dp_Port;
  40.   void         (*dp_ExitCode)();
  41. };
  42.  
  43. #define DAEMONPORTNAME "inetd.ipc"
  44.  
  45. /*
  46.  * A message associated with each launched process 
  47.  */
  48. struct DaemonMessage {
  49.   struct Message dm_Msg;    /* Message name is FreeVec()'ed by inetd */
  50.   struct Process*dm_Pid;    /* set by the launcher */
  51.   struct Segment*dm_Seg;    /* used only if resident segment */
  52.   LONG           dm_Id;        /* socket id */
  53.   LONG         dm_Retval;    /* non-zero errorcode */
  54.   UBYTE          dm_Family;    /* address/protocol family */
  55.   UBYTE          dm_Type;
  56. };
  57.  
  58. /* Daemon types, used as socket types */
  59. #define DMTYPE_UNKNOWN   -1
  60. #define DMTYPE_INTERNAL  0        /* type is within builtin struct */
  61. #define DMTYPE_STREAM    SOCK_STREAM    /* stream socket */
  62. #define DMTYPE_DGRAM     SOCK_DGRAM    /* datagram socket */
  63. #define DMTYPE_RAW       SOCK_RAW    /* raw-protocol interface */
  64. #define DMTYPE_RDM       SOCK_RDM    /* reliably-delivered message */
  65. #define DMTYPE_SEQPACKET SOCK_SEQPACKET /* sequenced packet stream */
  66.  
  67. /* Return values from the startup code */
  68. #define DERR_LIB    0xA0
  69. #define DERR_OBTAIN 0xA1
  70.  
  71. #endif /* INETD_H */
  72.